<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var day = prompt('请输入本月日期');
        if (day == 1 || day % 7 == 1) {
            alert('该日期为星期一');
        } else if (day == 2 || day % 7 == 2) {
            alert('该日期为星期二');
        } else if (day == 3 || day % 7 == 3) {
            alert('该日期为星期三');
        } else if (day == 4 || day % 7 == 4) {
            alert('该日期为星期四');
        } else if (day == 5 || day % 7 == 5) {
            alert('该日期为星期五');
        } else if (day == 6 || day % 7 == 6) {
            alert('该日期为星期六');
        } else if (day == 7 || day % 7 == 0) {
            alert('该日期为星期日');
        } else {
            alert('请输入有效日期');
        }
    </script>
</head>
<body>
    
</body>
</html>